import React,{useEffect, useState} from 'react'

function Appson() {
  let [count,setCount] = useState(0)
  useEffect(()=>{  // useEffect 返回的这个函数可以模拟组件将要卸载的生命周期
     console.log("zirender");
      return ()=>{
         console.log("我被卸载掉了");
      }
  },[])
  return (
    <div>Appson
     <h1>{count}</h1>
      <button onClick={()=>setCount(count=>count + 1)}>修改子组健的合租那个太</button>
    </div>
  )
}

export default Appson